home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 5695 < prev    next >
Mailbox/MIME Entity  |  1996-08-05  |  1.8 KB

open in: MacOS 8.1     |     Win98     |     DOS

browse contents    |     view JSON data     |     view as text


This file was processed as: Mailbox/MIME Entity (archive/mbox).

ConfidenceProgramDetectionMatch TypeSupport
100% dexvert Newsgroup Content (archive/news) magic Supported
100% dexvert Mailbox/MIME Entity (archive/mbox) magic Supported
100% dexvert Internet Message Format (text/imf) magic Supported
1% dexvert Text File (text/txt) fallback Supported
100% file news, ASCII text default
100% checkBytes Printable ASCII default
100% dexmagic PrintFox/Pagefox WEAK default
100% perlTextCheck Likely Text (Perl) default
100% siegfried fmt/950 MIME Email (1.0) default
100% detectItEasy Format: plain text[LF] default (weak)
100% xdgMime message/news default



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 50 61 74 68 3a 20 72 65 | 64 2e 77 65 65 67 2e 75 |Path: re|d.weeg.u|
|00000010| 69 6f 77 61 2e 65 64 75 | 21 72 6f 62 69 6e 73 6f |iowa.edu|!robinso|
|00000020| 6e 0a 46 72 6f 6d 3a 20 | 54 68 65 20 41 6d 6f 72 |n.From: |The Amor|
|00000030| 70 68 6f 75 73 20 4d 61 | 73 73 20 3c 72 6f 62 69 |phous Ma|ss <robi|
|00000040| 6e 73 6f 6e 40 62 6c 75 | 65 2e 77 65 65 67 2e 75 |nson@blu|e.weeg.u|
|00000050| 69 6f 77 61 2e 65 64 75 | 3e 0a 4e 65 77 73 67 72 |iowa.edu|>.Newsgr|
|00000060| 6f 75 70 73 3a 20 63 6f | 6d 70 2e 6c 61 6e 67 2e |oups: co|mp.lang.|
|00000070| 63 0a 53 75 62 6a 65 63 | 74 3a 20 52 65 3a 20 45 |c.Subjec|t: Re: E|
|00000080| 61 73 69 65 73 74 20 77 | 61 79 20 74 6f 20 63 65 |asiest w|ay to ce|
|00000090| 6e 74 65 72 20 61 20 73 | 74 72 69 6e 67 3f 0a 44 |nter a s|tring?.D|
|000000a0| 61 74 65 3a 20 54 75 65 | 2c 20 32 30 20 46 65 62 |ate: Tue|, 20 Feb|
|000000b0| 20 31 39 39 36 20 31 31 | 3a 30 34 3a 34 30 20 2d | 1996 11|:04:40 -|
|000000c0| 30 36 30 30 0a 4f 72 67 | 61 6e 69 7a 61 74 69 6f |0600.Org|anizatio|
|000000d0| 6e 3a 20 55 6e 69 76 65 | 72 73 69 74 79 20 6f 66 |n: Unive|rsity of|
|000000e0| 20 49 6f 77 61 2c 20 49 | 6f 77 61 20 43 69 74 79 | Iowa, I|owa City|
|000000f0| 2c 20 49 41 2c 20 55 53 | 41 0a 44 69 73 74 72 69 |, IA, US|A.Distri|
|00000100| 62 75 74 69 6f 6e 3a 20 | 77 6f 72 6c 64 0a 4d 65 |bution: |world.Me|
|00000110| 73 73 61 67 65 2d 49 44 | 3a 20 3c 50 69 6e 65 2e |ssage-ID|: <Pine.|
|00000120| 41 33 32 2e 33 2e 39 31 | 2e 39 36 30 32 32 30 31 |A32.3.91|.9602201|
|00000130| 30 35 34 30 33 2e 38 36 | 32 39 31 44 2d 31 30 30 |05403.86|291D-100|
|00000140| 30 30 30 40 72 65 64 2e | 77 65 65 67 2e 75 69 6f |000@red.|weeg.uio|
|00000150| 77 61 2e 65 64 75 3e 0a | 52 65 66 65 72 65 6e 63 |wa.edu>.|Referenc|
|00000160| 65 73 3a 20 3c 34 66 6f | 62 6b 61 24 31 73 74 40 |es: <4fo|bka$1st@|
|00000170| 70 61 72 6c 6f 72 2e 68 | 69 77 61 61 79 2e 6e 65 |parlor.h|iwaay.ne|
|00000180| 74 3e 20 3c 44 4d 71 45 | 47 35 2e 38 7a 34 40 65 |t> <DMqE|G5.8z4@e|
|00000190| 73 6b 69 6d 6f 2e 63 6f | 6d 3e 20 3c 34 66 72 69 |skimo.co|m> <4fri|
|000001a0| 66 35 24 65 36 70 40 66 | 6f 68 6e 69 78 2e 6d 65 |f5$e6p@f|ohnix.me|
|000001b0| 74 72 6f 6e 65 74 2e 63 | 6f 6d 3e 20 3c 44 4d 75 |tronet.c|om> <DMu|
|000001c0| 75 7a 47 2e 31 79 4b 40 | 65 73 6b 69 6d 6f 2e 63 |uzG.1yK@|eskimo.c|
|000001d0| 6f 6d 3e 20 3c 34 67 62 | 6d 6d 6f 24 6d 35 76 40 |om> <4gb|mmo$m5v@|
|000001e0| 61 69 72 64 6d 68 6f 72 | 2e 67 65 6e 2e 6e 7a 3e |airdmhor|.gen.nz>|
|000001f0| 0a 4e 4e 54 50 2d 50 6f | 73 74 69 6e 67 2d 48 6f |.NNTP-Po|sting-Ho|
|00000200| 73 74 3a 20 72 65 64 2e | 77 65 65 67 2e 75 69 6f |st: red.|weeg.uio|
|00000210| 77 61 2e 65 64 75 0a 4d | 69 6d 65 2d 56 65 72 73 |wa.edu.M|ime-Vers|
|00000220| 69 6f 6e 3a 20 31 2e 30 | 0a 43 6f 6e 74 65 6e 74 |ion: 1.0|.Content|
|00000230| 2d 54 79 70 65 3a 20 54 | 45 58 54 2f 50 4c 41 49 |-Type: T|EXT/PLAI|
|00000240| 4e 3b 20 63 68 61 72 73 | 65 74 3d 55 53 2d 41 53 |N; chars|et=US-AS|
|00000250| 43 49 49 0a 58 2d 53 65 | 6e 64 65 72 3a 20 72 6f |CII.X-Se|nder: ro|
|00000260| 62 69 6e 73 6f 6e 40 72 | 65 64 2e 77 65 65 67 2e |binson@r|ed.weeg.|
|00000270| 75 69 6f 77 61 2e 65 64 | 75 0a 49 6e 2d 52 65 70 |uiowa.ed|u.In-Rep|
|00000280| 6c 79 2d 54 6f 3a 20 3c | 34 67 62 6d 6d 6f 24 6d |ly-To: <|4gbmmo$m|
|00000290| 35 76 40 61 69 72 64 6d | 68 6f 72 2e 67 65 6e 2e |5v@airdm|hor.gen.|
|000002a0| 6e 7a 3e 20 0a 0a 4f 6e | 20 32 30 20 46 65 62 20 |nz> ..On| 20 Feb |
|000002b0| 31 39 39 36 2c 20 53 69 | 6d 6f 6e 20 48 6f 73 69 |1996, Si|mon Hosi|
|000002c0| 65 20 77 72 6f 74 65 3a | 0a 0a 3e 20 20 20 49 73 |e wrote:|..> Is|
|000002d0| 20 74 68 69 73 20 70 6f | 72 74 61 62 6c 65 20 28 | this po|rtable (|
|000002e0| 49 20 64 6f 6e 27 74 20 | 68 61 76 65 20 6d 79 20 |I don't |have my |
|000002f0| 6d 61 6e 20 70 61 67 65 | 73 20 61 76 61 69 6c 61 |man page|s availa|
|00000300| 62 6c 65 2c 20 49 20 62 | 72 6f 6b 65 20 74 68 65 |ble, I b|roke the|
|00000310| 6d 29 2e 2e 0a 3e 20 0a | 3e 20 23 64 65 66 69 6e |m)...> .|> #defin|
|00000320| 65 20 4c 69 6e 65 4c 65 | 6e 20 38 30 0a 3e 20 63 |e LineLe|n 80.> c|
|00000330| 68 61 72 20 2a 53 74 72 | 69 6e 67 20 3d 20 22 49 |har *Str|ing = "I|
|00000340| 20 61 6d 20 61 20 66 69 | 73 68 22 3b 0a 3e 20 0a | am a fi|sh";.> .|
|00000350| 3e 20 70 72 69 6e 74 66 | 28 22 25 2a 73 5c 6e 22 |> printf|("%*s\n"|
|00000360| 2c 20 28 73 74 72 6c 65 | 6e 28 53 74 72 69 6e 67 |, (strle|n(String|
|00000370| 20 2d 20 4c 69 6e 65 4c | 65 6e 29 20 2f 20 32 2c | - LineL|en) / 2,|
|00000380| 20 53 74 72 69 6e 67 29 | 3b 0a 20 20 20 20 20 20 | String)|;. |
|00000390| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 5e 5e 5e | | ^^^|
|000003a0| 5e 5e 5e 5e 5e 5e 5e 5e | 5e 5e 5e 5e 5e 5e 5e 5e |^^^^^^^^|^^^^^^^^|
|000003b0| 5e 5e 5e 5e 0a 0a 20 20 | 54 68 61 74 27 73 20 65 |^^^^.. |That's e|
|000003c0| 71 75 69 76 61 6c 65 6e | 74 20 74 6f 20 73 74 72 |quivalen|t to str|
|000003d0| 6c 65 6e 28 53 74 72 69 | 6e 67 20 2b 20 2d 4c 69 |len(Stri|ng + -Li|
|000003e0| 6e 65 4c 65 6e 29 2c 20 | 77 68 69 63 68 20 69 73 |neLen), |which is|
|000003f0| 20 69 6e 20 74 75 72 6e | 20 0a 65 71 75 69 76 61 | in turn| .equiva|
|00000400| 6c 65 6e 74 20 74 6f 20 | 73 74 72 6c 65 6e 28 53 |lent to |strlen(S|
|00000410| 74 72 69 6e 67 5b 2d 4c | 69 6e 65 4c 65 6e 5d 29 |tring[-L|ineLen])|
|00000420| 2c 20 61 6e 64 20 74 68 | 65 20 65 78 70 72 65 73 |, and th|e expres|
|00000430| 73 69 6f 6e 20 53 74 72 | 69 6e 67 5b 2d 38 30 5d |sion Str|ing[-80]|
|00000440| 20 69 73 20 0a 70 6f 72 | 74 61 62 6c 65 20 6f 6e | is .por|table on|
|00000450| 6c 79 20 69 6e 20 74 68 | 65 20 73 65 6e 73 65 20 |ly in th|e sense |
|00000460| 74 68 61 74 20 69 74 73 | 20 62 65 68 61 76 69 6f |that its| behavio|
|00000470| 72 20 69 73 20 75 6e 64 | 65 66 69 6e 65 64 20 6f |r is und|efined o|
|00000480| 6e 20 61 6c 6c 20 0a 70 | 6c 61 74 66 6f 72 6d 73 |n all .p|latforms|
|00000490| 2e 20 3a 29 0a 0a 20 20 | 49 66 20 79 6f 75 20 6d |. :).. |If you m|
|000004a0| 65 61 6e 74 20 28 73 74 | 72 6c 65 6e 28 53 74 72 |eant (st|rlen(Str|
|000004b0| 69 6e 67 29 20 2d 20 4c | 69 6e 65 4c 65 6e 29 20 |ing) - L|ineLen) |
|000004c0| 2f 20 32 20 74 68 65 6e | 20 79 6f 75 20 77 69 6c |/ 2 then| you wil|
|000004d0| 6c 20 67 65 74 20 61 20 | 0a 6e 65 67 61 74 69 76 |l get a |.negativ|
|000004e0| 65 20 6c 65 6e 67 74 68 | 20 73 70 65 63 69 66 69 |e length| specifi|
|000004f0| 65 72 20 66 6f 72 20 61 | 6e 79 20 73 74 72 69 6e |er for a|ny strin|
|00000500| 67 20 77 69 74 68 20 66 | 65 77 65 72 20 74 68 61 |g with f|ewer tha|
|00000510| 6e 20 4c 69 6e 65 4c 65 | 6e 20 0a 63 68 61 72 61 |n LineLe|n .chara|
|00000520| 63 74 65 72 73 2e 20 20 | 49 66 20 79 6f 75 20 6d |cters. |If you m|
|00000530| 65 61 6e 74 20 28 4c 69 | 6e 65 4c 65 6e 20 2d 20 |eant (Li|neLen - |
|00000540| 73 74 72 6c 65 6e 28 53 | 74 72 69 6e 67 29 20 2f |strlen(S|tring) /|
|00000550| 20 32 2c 20 74 68 65 6e | 20 79 6f 75 72 20 0a 70 | 2, then| your .p|
|00000560| 72 69 6e 74 66 28 29 20 | 77 69 6c 6c 20 64 69 73 |rintf() |will dis|
|00000570| 70 6c 61 79 20 74 68 65 | 20 65 6e 74 69 72 65 20 |play the| entire |
|00000580| 73 74 72 69 6e 67 20 6f | 6e 20 74 68 65 20 6c 65 |string o|n the le|
|00000590| 66 74 20 73 69 64 65 20 | 6f 66 20 74 68 65 20 73 |ft side |of the s|
|000005a0| 63 72 65 65 6e 20 69 66 | 20 0a 73 74 72 6c 65 6e |creen if| .strlen|
|000005b0| 28 53 74 72 69 6e 67 29 | 20 3c 3d 20 4c 69 6e 65 |(String)| <= Line|
|000005c0| 4c 65 6e 2f 32 2c 20 6f | 72 20 61 20 73 75 62 73 |Len/2, o|r a subs|
|000005d0| 74 72 69 6e 67 20 63 6f | 6e 73 69 73 74 69 6e 67 |tring co|nsisting|
|000005e0| 20 6f 66 20 74 68 65 20 | 66 69 72 73 74 20 0a 28 | of the |first .(|
|000005f0| 4c 69 6e 65 4c 65 6e 20 | 2d 20 73 74 72 6c 65 6e |LineLen |- strlen|
|00000600| 28 53 74 72 69 6e 67 29 | 2f 32 20 63 68 61 72 61 |(String)|/2 chara|
|00000610| 63 74 65 72 73 20 6f 6e | 20 74 68 65 20 6c 65 66 |cters on| the lef|
|00000620| 74 20 73 69 64 65 20 6f | 66 20 74 68 65 20 73 63 |t side o|f the sc|
|00000630| 72 65 65 6e 20 69 66 20 | 0a 4c 69 6e 65 4c 65 6e |reen if |.LineLen|
|00000640| 20 3e 20 73 74 72 6c 65 | 6e 28 53 74 72 69 6e 67 | > strle|n(String|
|00000650| 29 20 3e 20 4c 69 6e 65 | 4c 65 6e 2f 32 2e 20 20 |) > Line|Len/2. |
|00000660| 54 68 69 73 20 69 73 20 | 70 6f 72 74 61 62 6c 65 |This is |portable|
|00000670| 2c 20 62 75 74 20 69 74 | 20 64 6f 65 73 20 6e 6f |, but it| does no|
|00000680| 74 20 0a 63 65 6e 74 65 | 72 20 61 6e 79 74 68 69 |t .cente|r anythi|
|00000690| 6e 67 20 6f 6e 20 74 68 | 65 20 73 63 72 65 65 6e |ng on th|e screen|
|000006a0| 2c 20 61 6e 64 20 69 74 | 20 62 6c 6f 77 73 20 75 |, and it| blows u|
|000006b0| 70 20 66 6f 72 20 73 74 | 72 6c 65 6e 28 53 74 72 |p for st|rlen(Str|
|000006c0| 69 6e 67 29 20 3e 20 4c | 69 6e 65 4c 65 6e 2e 0a |ing) > L|ineLen..|
|000006d0| 0a 20 20 42 61 63 6b 20 | 74 6f 20 74 68 65 20 64 |. Back |to the d|
|000006e0| 72 61 77 69 6e 67 20 62 | 6f 61 72 64 2e 20 3a 29 |rawing b|oard. :)|
|000006f0| 0a 0a 2d 2d 20 4a 61 6d | 65 73 0a 65 6d 61 69 6c |..-- Jam|es.email|
|00000700| 3a 20 6a 61 6d 65 73 2d | 72 6f 62 69 6e 73 6f 6e |: james-|robinson|
|00000710| 40 75 69 6f 77 61 2e 65 | 64 75 0a |@uiowa.e|du. |
+--------+-------------------------+-------------------------+--------+--------+